<?php

namespace App\Entities;

use Illuminate\Database\Eloquent\Model;

class PrizeType extends Model
{
    const ALIPAY = 'alipay';
    const WECHAT = 'wechat';
    const COUPON = 'coupon';
    const ENTITY = 'entity';
    const BUY = 'buy';

    protected $fillable = [
        'code',
        'name',
    ];

    public function prizes()
    {
        return $this->hasMany(Prize::class, 'type_code', 'code');
    }
}
